[tool.poetry]
name = "instructor"
version = "1.2.6"
description = "structured outputs for llm"
authors = ["Jason Liu <jason@jxnl.co>"]
license = "MIT"
readme = "README.md"
packages = [{include = "instructor"}]
repository = "https://github.com/jxnl/instructor"

[tool.poetry.dependencies]
python = "^3.9"
openai = "^1.1.0"
pydantic = "^2.7.0"
docstring-parser = "^0.16"
typer = ">=0.9.0,<1.0.0"
rich = "^13.7.0"
aiohttp = "^3.9.1"
tenacity = "^8.2.3"
pydantic-core = "^2.18.0"

# dependency versions for extras
fastapi = { version = "^0.109.2", optional = true }
redis = { version = "^5.0.1", optional = true }
diskcache = { version = "^5.6.3", optional = true }
pandas = { version = "^2.2.0", optional = true }
tabulate = { version = "^0.9.0", optional = true }
pydantic_extra_types = { version = "^2.6.0", optional = true }
litellm = { version = "^1.35.31", optional = true }
anthropic = { version = "^0.23.1", optional = true }
xmltodict = { version = "^0.13.0", optional = true }
groq = { version = "^0.4.2", optional = true }
cohere = { version = "^5.1.8", optional = true }
mistralai = { version = "^0.1.8", optional = true }

[tool.poetry.extras]
anthropic = ["anthropic", "xmltodict"]
groq = ["groq"]
cohere = ["cohere"]
test-docs = ["fastapi", "redis", "diskcache", "pandas", "tabulate", "pydantic_extra_types", "litellm", "anthropic", "groq", "cohere", "mistralai"]
mistralai = ["mistralai"]
litellm = ["litellm"]

[tool.poetry.scripts]
instructor = "instructor.cli.cli:app"

[tool.poetry.group.dev.dependencies]
pytest = "^7.4.0"
pytest-asyncio = "^0.21.1"
coverage = "^7.3.2"
pyright = "^1.1.360"

[tool.poetry.group.docs.dependencies]
mkdocs = "^1.4.3"
mkdocs-material = {extras = ["imaging"], version = "^9.5.9"}
mkdocstrings = "^0.22.0"
mkdocstrings-python = "^1.1.2"
pytest-examples = "^0.0.10"
mkdocs-jupyter = "^0.24.6"
mkdocs-rss-plugin = "^1.12.0"
mkdocs-minify-plugin = "^0.8.0"
mkdocs-redirects = "^1.2.1"

[tool.poetry.group.anthropic.dependencies]
anthropic = "^0.23.1"

[tool.poetry.group.test-docs.dependencies]
fastapi = "^0.109.2"
redis = "^5.0.1"
diskcache = "^5.6.3"
pandas = "^2.2.0"
tabulate = "^0.9.0"
pydantic_extra_types = "^2.6.0"
litellm = "^1.35.31"
anthropic = "^0.23.1"
xmltodict = "^0.13.0"
groq = "^0.4.2"
phonenumbers = "^8.13.33"
cohere = "^5.1.8"
mistralai = "^0.1.8"

[tool.poetry.group.litellm.dependencies]
litellm = "^1.35.31"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.pyright]
include = ["instructor"]
exclude = [
    "**/node_modules",
    "**/__pycache__",
    "src/experimental",
    "src/typestubs",
    "**/tests/**",
]
pythonVersion = "3.9"
typeCheckingMode = "strict"
# Allow "redundant" runtime type-checking.
reportUnnecessaryIsInstance = "none"
reportUnnecessaryTypeIgnoreComment = "error"
